﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WPS.SDK.exception
{
    public class YunResultException:YunException
    {
        private String result;
        private int code;
        private JObject jsonObject;

        public YunResultException(string result, string msg)
            :base(msg)
        {
            this.result = result;
        }

        public YunResultException(string result, string msg, int code, JObject jsonObject)
             : base(msg)
        {
            this.result = result;
            this.code = code;
            this.jsonObject = jsonObject;
        }

        public YunResultException(string result, string msg, Exception e)
              :base(msg, e)
        {
            this.result = result;
        }

        public override string getResult()
        {
            return this.result;
        }

        public override int getCode()
        {
            return this.code;
        }

        public JObject getJSONObject()
        {
            return this.jsonObject;
        }
    }
}
